package com.wejoy.video.middle.station.data.enums.dict;

public enum RoleSerachUser {
    /**
     * The new.
     */
    NEW(351918074250682369l, "普通用户"),

    AUDIT(356938137408155648l, "管理员"),

    RELEASE(359288923727396865l, "超级管理员");

    private Long code;
    private String text;
    RoleSerachUser(Long code, String text) {
        this.code = code;
        this.text = text;
    }

    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    /**
     * 通过code获得该枚举类型
     *
     * @param code
     * @return
     */
    public static RoleSerachUser getByCode(Integer code) {
        RoleSerachUser[] values = RoleSerachUser.values();
        for (RoleSerachUser type : values) {
            if (type.code.equals(code)) {
                return type;
            }
        }
        return NEW;
    }
}
